#include "SMPPDestNetworkId.hpp"

using namespace smpp::pdu;

DestNetworkId::DestNetworkId(const CoctetString &nValue):
TLV(TLVtags::TAG_DEST_NETWORK_ID,nValue.size()),_Value(nValue){}

DestNetworkId::DestNetworkId(const DestNetworkId &nDestNetworkId):
TLV(nDestNetworkId),_Value(nDestNetworkId.getValue()){}

bool DestNetworkId::operator ==(
	const DestNetworkId &nDestNetworkId) const{
	return (TLV::operator == (nDestNetworkId) && 
			_Value == nDestNetworkId.getValue());
}

bool DestNetworkId::operator !=(
	const DestNetworkId &nDestNetworkId) const{
	return !this->operator == (nDestNetworkId);
}

DestNetworkId &DestNetworkId::operator = (
	const DestNetworkId &nDestNetworkId){
	if(*this == nDestNetworkId)
		return *this;
	TLV::operator = (nDestNetworkId);
	_Value = nDestNetworkId.getValue();
	return *this;
}

void DestNetworkId::setValue(const CoctetString &nValue){
	_Value = nValue;
}

const CoctetString &DestNetworkId::getValue() const{
	return _Value;
}
